package pl.mdziedzic.unittests;

import java.util.Calendar;

public class Bid implements Comparable<Bid> {
	
	private long price;
	private Calendar bidDate;
	private User buyer;
	
	@SuppressWarnings("unused")
  private Bid() {
	}
	
	public Bid(long price, User buyer, Calendar bidDate) {
	  this.price = price;
	  this.buyer = buyer;
	  this.bidDate = bidDate;
  }

	public long getPrice() {
  	return price;
  }

	public Calendar getBidDate() {
  	return bidDate;
  }

	public User getBuyer() {
  	return buyer;
  }

	@Override
  public int compareTo(Bid other) {
		if (other == this) {
	    return 0;
    }
		
		return bidDate.compareTo(other.bidDate);
  }
	
}
